package com.itlong.cloud.POJO.VO.property;

import com.itlong.cloud.enumerate.OpenTypeEnum;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang.StringUtils;

/**
 * <desc>
 *      通行记录VO
 * </desc>
 *
 * @createDate 2017/10/10
 */

@Data
@NoArgsConstructor
public class PropertyEquipRecordGetVO {

    //设备名称
    private String deviceName;

    //设备唯一码
    private String deviceUnique;

    //云对讲类型  31-门口机  32-围墙机
    private String smartType;

    //住户姓名
    private String realName;

    //住户手机号
    private String phoneNum;

    private String email;    //邮箱

    //QQ号
    private String qqNum;

    //通行方式  1-点击，2-自动感应，3-摇一摇,4-电话开门,5-访客开门 ,6-自主开门,7-密码开门,12-人脸识别
    private Integer openType;

    //通行时间
    private String passTime;

    //呼出号码
    private String callPhoneNo;

    private String openTypeName;

    private String facePicUrl;  // 人脸识别图片URL

    private Integer timescount;

    private Integer source;

    private String fromFloor;

    private String toFloor;



    public String getOpenTypeName() {
        if (openType == null) {
            return "";
        }
         return OpenTypeEnum.getDescription(openType);
    }
    public String getSmartType() {
        if(StringUtils.isEmpty(smartType)){
            return "";
        }
       // return PropertyEquipTypeEnum.getDescription(Integer.parseInt(smartType));

        switch (smartType) {
            case "31":
                return "云对讲（门口机）";
            case "32":
                return "云对讲（围墙机）";
            default:
                return "";
        }
    }

}